package day06;
import java.util.Arrays;
public class ArrayDemo {
    public static void main(String[] args) {
        int[] arr = new int[10];

        for (int i = 0 ;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
            System.out.println(arr[i]);
        }

        Arrays.sort(arr);

        System.out.println("排序后:");
        for (int i = 0 ;i<arr.length;i++){
            System.out.println(arr[i]);
        }









        /*
        int[] a = {10,20,30,40,50};
        int[] b = new int[6];
        System.arraycopy(a, 1,b,0,4);
        for (int i =1;i<b.length;i++){
            System.out.println(b[i]);
        }
         */

    }
}
